package qalight;


public class Person {
    protected String  firstName; //??? ???????????? ?????? private ???? -> protected ??? ???? ??? ? ??? ?????? ? ?????? tmployee
    protected String lastName;
    protected int age;
    protected boolean isMale;
    protected int weight;

    public Person (String firstName, String lastName) {
        this.firstName = firstName;
        this.lastName = lastName;

    }


    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if (age <0 || age > 100) {
            throw new IllegalArgumentException( "Age cannot be" + age);// - ??????????? ??????
//            System.out.println( "Its impossible  " + age);
//            age = 0;
//            return;
        }
        this.age = age;
    }

    public boolean isMale() {
        return isMale;
    }

    public void setMale(boolean isMale) {
        this.isMale = isMale;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }





    public Person (){
      //  System.out.println("I`m constructor"); ???????????
        weight = 80; // ?????????? ??? ????
    }

    public static void main(String[] args) {

        System.out.println("Hi a`m Person");
        Person person = new Person();
        Person person2 = new Person();
        Person person3 = new Person();
        person.printMe();
    }

    void printMe() {
        System.out.println("this is Print");

    }
}
